package elec315.chatroom;

import java.awt.BorderLayout;
import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;


public class GuiFrame {
	
	public static void main(String[] args) {
		JFrame frame = new JFrame();
		JPanel p = new JPanel();
	    
		JTextField userName = new JTextField();
	    JTextField serverAddr = new JTextField();
	    
	    JButton oK = new JButton("OK");
		p.setLayout(new GridLayout(3,3,1,1));
		//for(int i =0 ; i< 4 ; i++)
		p.add(new JLabel("  "));
		p.add(oK);
		//for(int i =0 ; i< 4 ; i++)
		p.add(new JLabel("  "));
		frame.setLayout(new GridLayout(3,2,2,2));
		frame.add(new JLabel("Login Name"));
		frame.add(userName);
		frame.add(new JLabel("Server IP Addr"));
		frame.add(serverAddr);
		frame.add(new JLabel("  Default Server Setting : 127.0.0.1"));
		frame.add(p);
//		oK.addActionListener(new oKButtonListener());
//		serverAddr.addActionListener(new oKButtonListener());
		
		frame.setVisible(false);
		frame.setTitle("Client Log in");
		frame.setSize(500, 300);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setVisible(true);
	}


}

